package com.cy.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cy.common.vo.GoodsList;
import com.cy.common.vo.JsonResult;
import com.cy.common.vo.PageObject;
import com.cy.entity.SysGoodsInfo;
import com.cy.service.SysIndexService;

/**  
 * @Title:  SysIndexController.java   
 * @Package com.cy.controller   
 * @Description:    描述   
 * @author: ZHANGSIMIN     
 * @date:   2019年10月22日 下午5:33:06   
 * @version V1.0 
 */
@Controller
@RequestMapping("/indexPage/")
public class SysIndexController {
	
	@Autowired
	private SysIndexService sysIndexService;
	
	@RequestMapping("getSlider")
	@ResponseBody
	public JsonResult getSliderList() {
		return new JsonResult(sysIndexService.getIndexSlider());
	}
	
	@RequestMapping("getIndexGoods")
	@ResponseBody
	public JsonResult getIndexGoods(Integer type) {
		PageObject<GoodsList> page = sysIndexService.getIndexGoods(type);
		return new JsonResult(page);
	}
}
